<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    function getAge() {
        var now = new Date().getFullYear();
        return now - this.birth;
    }

    var kuangshen = {
        name:'秦僵',
        birth: 2000,
        //方法
        age:getAge
    };

    //kuangshen.age()  ok
    //getAge() NaN

    getAge.apply(kuangshen,[]);//this指向了kuangshen,参数为空
</script>
</body>
</html>